package com.atguigu.gulimall.order;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 使用rabbitmq
 * 1.引入amqp场景 RabbitAutoConfiguration会自动生效
 * 2.给容器中自动配置了
 *       RabbitTemplate AmqpAdmin CachingConnectionFactory RabbitMessagingTemplate
 *       配置 spring.rabbitmq
 * 3.启动注解 @EnableRabbit
 * 4.监听消息 使用@RabbitListener
 *      @RabbitListener(类+方法 监听哪些队列)
 *      @RabbitHandler(方法 重载区分不同的消息)
 *
 */

@EnableAspectJAutoProxy(exposeProxy = true)
@EnableFeignClients
@EnableRedisHttpSession
@EnableDiscoveryClient
@EnableRabbit
@SpringBootApplication
public class GulimallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallOrderApplication.class, args);
    }

}
